@layout("/common/_container.html",{bg:"bg-white",js:["/assets/modular/category/category_add.js"]}){
<form id="categoryForm" lay-filter="categoryForm" class="layui-form model-form">
    <input name="id" type="hidden"/>
    <div class="layui-form-item">
        <#pic boxid="iconPicBox" name="图标"  tip="请上传小于500kb的图片"  hiddenInput="icon" uploadButton="uploadIconPic" />
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分类名称<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="categoryName" name="categoryName" placeholder="请输入分类名称" type="text" class="layui-input" lay-verify="limitLength" required/>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">分类排序<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="weights" name="weights" placeholder="请输入分类排序 从1开始" type="text" class="layui-input" lay-verify="required" required/>
        </div>
    </div>
    <div class="layui-form-item" id="homeCategory" style="display: none">
        <label class="layui-form-label">首页显示<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input type="checkbox" id="isImportant" name="isImportant"  value="1" lay-skin="switch"  lay-text="是|否"   />
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">父级<span style="color: red;">*</span></label>
        <div class="layui-input-block">
            <input id="pName" name="pName" placeholder="父类" type="text" class="layui-input" lay-verify="required" required/>
            <input id="parentId" name="parentId" type="hidden">

        </div>
    </div>
    <div class="layui-form-item text-right">
        <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
        <button class="layui-btn" lay-filter="btnSubmit" lay-submit>保存</button>
    </div>
</form>
@}